﻿<div class="modal-header blue-strip handle">
    <button type="button" class="close" aria-hidden="true" ng-click="$close()"></button>
    <h3 class="modal-title">
        {{'QuestionsSearchTitle' | i18next}}
    </h3>
</div>
<div class="modal-body">
    <div class="header-block clearfix">
        <form>
            <div class="input-group custom-dropdown-search">
                <div class="input-group-btn custom-dropdown">
                    <button class="btn dropdown-toggle" id="classification-group" data-toggle="dropdown" uib-dropdown-toggle type="button">
                        {{selectedFilter.title }}
                        <span class="dropdown-arrow"></span>
                    </button>
                    <div class="dropdown-menu" role="menu" aria-labelledby="classification-group-dropdown">
                        <perfect-scrollbar class="scroller">
                            <ul class="list-unstyled">
                                <li ng-repeat="filter in filters">
                                    <a role="menuitem" tabindex="-1" ng-click="changeFilter(filter)">{{filter.title}}</a>
                                </li>
                            </ul>
                        </perfect-scrollbar>
                    </div>
                </div><!-- /btn-group -->
                <div class="search">
                    <input type="text" ng-model="searchText" placeholder="{{'SearchQuestionPlaceholder' | i18next}}" class="form-control" id="searchFor" aria-label="classification-search">
                </div>
                <div class="input-group-btn input-group-btn-right">
                    <span class="search-icon" aria-hidden="true"></span>
                    <button type="button" class="btn btn-link btn-clear">
                        <span></span>
                    </button>
                </div>   
            </div><!-- /input-group -->
        </form>
        <span class="group-summary pull-right">{{ totalResults }} {{'QuestionsSearchEntities' | i18next}}</span>
    </div>
    <perfect-scrollbar class="scroller">
        <div class="tile-wrapper">
            <div class="tile-column">
                <div class="tile" ng-class="searchResult.type" ng-repeat="searchResult in searchResult1">
                    <h4><div ng-if="searchResult.icon !== null" class="icon {{searchResult.icon}}"></div><a target="_blank" rel="noopener noreferrer" ng-href="{{getLink(searchResult)}}"><span class="roster-marker" ng-show="searchResult.type === 'roster'" ng-i18next="TreeRoster"></span> {{searchResult.title}}</a></h4>
                    <h5>{{searchResult.questionnaireTitle}}</h5>
                    <div class="tile-footer clearfix">
                        <a ng-if="searchResult.hasFolder" class="bg-info" ng-click="changeFilter(searchResult.folder)">{{searchResult.folder.title}}</a>
                        <button class="btn btn-link add-button" ng-click="pasteEntity(searchResult)">{{'Add' | i18next}}</button>
                    </div>
                </div>
            </div>
            <div class="tile-column">
                <div class="tile" ng-class="searchResult.type" ng-repeat="searchResult in searchResult2">
                    <h4><div ng-if="searchResult.icon !== null" class="icon {{searchResult.icon}}"></div><a target="_blank" rel="noopener noreferrer" ng-href="{{getLink(searchResult)}}"><span class="roster-marker" ng-show="searchResult.type === 'roster'" ng-i18next="TreeRoster"></span> {{searchResult.title}}</a></h4>
                    <h5>{{searchResult.questionnaireTitle}}</h5>
                    <div class="tile-footer clearfix">
                        <a ng-if="searchResult.hasFolder" class="bg-info" ng-click="changeFilter(searchResult.folder)">{{searchResult.folder.title}}</a>
                        <button class="btn btn-link add-button" ng-click="pasteEntity(searchResult)">{{'Add' | i18next}}</button>
                    </div>
                </div>
            </div>
        </div>
    </perfect-scrollbar>
</div>
